<template>
  <button @click="isShowDemo = !isShowDemo">切换隐藏/显示</button>
  <!--  给Demo组件 绑定了hello事件 若触发 就调用showHelloMsg方法-->
  <Demo v-if="isShowDemo"/>
</template>
<script>
  import Demo from "@/components/Demo.vue";
  import {ref} from 'vue'
  export default {
    name: 'App',
    components: {Demo},
    setup(){
      let isShowDemo=ref(true)
      return {
        isShowDemo
      }
    }



  }
</script>


